/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "promotionaloffertype")
@XmlRootElement(name = "promotionaloffertype")
@NamedQueries({
    @NamedQuery(name = "Promotionaloffertype.findAll", query = "SELECT p FROM Promotionaloffertype p"),
    @NamedQuery(name = "Promotionaloffertype.findByPromotionaloffertypeID", query = "SELECT p FROM Promotionaloffertype p WHERE p.promotionaloffertypeID = :promotionaloffertypeID"),
    @NamedQuery(name = "Promotionaloffertype.findByTypename", query = "SELECT p FROM Promotionaloffertype p WHERE p.typename = :typename"),
    @NamedQuery(name = "Promotionaloffertype.findByIsdeleted", query = "SELECT p FROM Promotionaloffertype p WHERE p.isdeleted = :isdeleted")})
public class Promotionaloffertype implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "PromotionaloffertypeID")
    private Long promotionaloffertypeID;
    @Column(name = "typename")
    private String typename;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    
    public Promotionaloffertype() {
    }

    public Promotionaloffertype(Long promotionaloffertypeID) {
        this.promotionaloffertypeID = promotionaloffertypeID;
    }

    public Long getPromotionaloffertypeID() {
        return promotionaloffertypeID;
    }

    public void setPromotionaloffertypeID(Long promotionaloffertypeID) {
        this.promotionaloffertypeID = promotionaloffertypeID;
    }

    public String getTypename() {
        return typename;
    }

    public void setTypename(String typename) {
        this.typename = typename;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (promotionaloffertypeID != null ? promotionaloffertypeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Promotionaloffertype)) {
            return false;
        }
        Promotionaloffertype other = (Promotionaloffertype) object;
        if ((this.promotionaloffertypeID == null && other.promotionaloffertypeID != null) || (this.promotionaloffertypeID != null && !this.promotionaloffertypeID.equals(other.promotionaloffertypeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Promotionaloffertype[promotionaloffertypeID=" + promotionaloffertypeID + "]";
    }

}
